package utils

import (
	"github.com/zeromicro/go-zero/core/logx"
	"go.uber.org/zap"
	"runtime/debug"
	"time"
)

func RecoverPanic() {
	if err := recover(); err != nil {
		logx.WithDuration(time.Second).Errorf("Panic Recover", zap.Any("Error", err))
		debug.PrintStack()
	}
}
